Sharpen Python skills in the field of cybersecurity.
讓在資安領域我們磨利Python技術。
Let's get started! 開始吧!
⭐TCP & UDP的差異 | FreeCodeCamp
source image from wikipedia
⭐新手指南: 如何在kali使用python| infoseccout.com
以下指令,展示如何跑名為test的python檔案。
python test.py
舉例來說,安裝 Nmap.
sudo apt install python3-nmap
Sockets
⭐更多關於sockets | Real Python
🔸TCP
傳輸控制協議 Transmission Control Protocol (TCP)
🔸UDP
使用者資料報協定 User Datagram Protocol (UDP)
建立客戶端
# test.py
import socket
HOST = "www.google.com"
PORT = 80
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect((HOST, PORT))
client.send(b"GET / HTTP/1.1\r\nHOST: google.com\r\n\r\n")
response = client.recv(4096)
print(response.decode())
client.close()